package com.share.rule.factory;

import com.share.common.core.domain.R;
import com.share.rule.api.RemoteFeeRuleService;
import com.share.rule.domain.FeeRule;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Author:pengyujia
 * Date: 2025/7/28 22:58
 * Description:
 */
@Component
public class RemoteFeeRuleFallbackFactory implements FallbackFactory<RemoteFeeRuleService> {
    @Override
    public RemoteFeeRuleService create(Throwable cause) {

        return new RemoteFeeRuleService() {
            @Override
            public R<List<FeeRule>> getFeeRuleList(List<Long> feeRuleIdList) {
                return R.fail();
            }

            @Override
            public R<FeeRule> getFeeRule(Long id) {
                return R.fail();
            }
        };
    }
}
